﻿using Nb.Common.Domains;

namespace Nb.LMS.Domains.Licenses
{
    /// <summary>
    /// 协议流转记录
    /// </summary>
    public class LicenseProcess : BaseAggregateRoot
    {
        public string ManufacturerCode { get; set; }
        public string CustomerId { get; set; }

        /// <summary>
        /// 未签名的协议内容
        /// </summary>
        public string RawContent { get; set; }
        /// <summary>
        /// 签名的协议内容
        /// </summary>
        public string SignedContent { get; set; }
        
        //申请
        public string ApplyAt { get; set; }
        public string ApplyBy { get; set; }
        //签名出货或者拒签
        public string FinishAt { get; set; }
        public string FinishBy { get; set; }

        public LicenseProcessStatus LicenseProcessStatus { get; set; }
    }
    
    /// <summary>
    /// 协议流转状态
    /// </summary>
    public enum LicenseProcessStatus
    {
        /// <summary>
        /// 新申请
        /// </summary>
        NewApply = 0,

        /// <summary>
        /// 签名授权
        /// </summary>
        Signed = 1,

        /// <summary>
        /// 拒签
        /// </summary>
        Deny =2
    }
}
